package lesson14;

public class Computer 
{
	String brand;
	int year;
	int price;
	boolean isNotebook;
	double hardDriveMemory;
	double freeMemory;
	String operationSystem;
	

	/*
	 * void changeColor (String newColor)
	{
		color = newColor;	
	} 
	
		nissan.changeColor("green");
	
	*/

	String changeOperationSystem(String newOperationSystem )
	{
		operationSystem = newOperationSystem;
		return operationSystem;
	}

	Double useMemory(double memory)
	{
		if(freeMemory - memory >= 0)
		{
		freeMemory -= memory;
		}
		
		else
		{
			System.out.println("Not enough free memory!");
			System.out.println();
		}
		
		return freeMemory;
	}
}